ScxV6Server.CreateObject Method
Creates a new database object and returns an ScxV6Object object representing the new object.
Parameters
- Class
The type of database object to create. All objects in the database have an associated class type that defines the behaviour of the object. - Group
The name of the database group in which the new database object will be created. Use "$Root" to create new objects in the root group of the database.
Returns
An ScxV6Object object representing the newly created object.
Remarks
All objects in the database have an associated class type, which in turn defines the behaviour of the object. The Class argument defines what type of object will be created. Common class names include:
Class | Description |
---|---|
CGroup | A database group. |
CMimic | A mimic. |
CPointAlgManual | An internal analogue point. |
CPointDigitalManual | An internal digital point. |
For more information see Database Structure, Schema, Object Names and Identifiers.
The following example written in VB.NET creates a new internal analogue point within"Group.Sub-Group".
Dim Svr As ScxV6DbClient.ScxV6Server
' Connect to the server
Svr = New ScxV6DbClient.ScxV6Server
Svr.Connect("MAIN", "", "")
Dim Obj As ScxV6DbClient.ScxV6Object
Obj = Svr.CreateObject("CPointAlgManual", "Group.Sub-Group")
Console.WriteLine("The name of the new object is ""{0}""", Obj.FullName)
' Disconnect
Svr.Disconnect()
This produces the following output:
The name of the new object is "Group.Sub-Group.New Analogue Point"